package com.woniuxy.carType.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.carType.common.RedisConst;
import com.woniuxy.carType.model.entity.CarType;
import com.woniuxy.carType.service.CarTypeService;
import com.woniuxy.carType.mapper.CarTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author liboyang
* @description 针对表【car_type(车辆类型)】的数据库操作Service实现
* @createDate 2024-10-19 11:04:29
*/
@Service
public class CarTypeServiceImpl extends ServiceImpl<CarTypeMapper, CarType>
    implements CarTypeService{
    @Autowired
    private CarTypeMapper carTypeMapper;

    @Override
    @Cacheable(cacheNames = RedisConst.CAR_TYPE_LIST, keyGenerator = "keyGenerator")
    public List<CarType> findAll() {
        return this.list();
    }
}




